	function check() {		
	  	  var keyword = $("#keyword").val();            
          var city = $("#city").val(); 
         
          if (keyword == '请输入服务商或店铺名称') {
          keyword = '';
          $("#keyword").attr('value','');
          }
          
          if (city == '中文/拼音'){
          city = '';
          $("#keyword").attr('value','');
         }	    	  
         	    	  
    	  if (keyword == '' &&  city == ''){
           	 alert('关键字和区域不能同时为空');
           	 return false;
           }
	}
	$(".city").click(function(e){
	    stopBubble(e);
	    $(".address_hot").hide();
		$(".suggestions").hide();
	    $(this).nextAll(".address_hot").show();
	    $(this).nextAll(".suggestions").hide();
	});		
	function ShowData1(obj) {
		switch (obj.id) {
		case "city_1":
			showCityList1(obj,1);
			break;
		case "keyword":
			showHotelList(obj);
			break;
		default:
			break;
		}
	}
	function ShowDiv1(obj) {
		$(".address_hot").hide();
		if ($("#" + obj.id).val() != "")
			$("#" + obj.id + "+.suggestions").show();
		else
			$("#" + obj.id + "+.suggestions").hide();
	}
	function showCityList1(obj,page) {
		var pageSize = 8;
		var city = $("#city_1").val();
		
		$.ajax({
		url:"getCityList.htm",
		type:"GET",
		dataType:"json",
		data:{
		        "keyword":city,
		        "currPage":page,
		        "pageSize":pageSize
		},  
		success:function(data) {  
		   var totalPage = data.totalPage;
		   var pageBar = '<div class="key_page">';
		   var res = data.listJson;
		   
		   for(var i = 0; i < data.pageBar.length; i++) {
		     if (page == data.pageBar[i])
		        pageBar += '<a class="now_k" href="#">' + data.pageBar[i]+ '</a>'
		   	 else { 
		   	    pageBar += '<a href="javascript:showCityList1(this,'+data.pageBar[i] +')">' + data.pageBar[i]+ '</a>'
		     }
		   }
		     pageBar += '</div>'
		   
		  
		   var html = '';
		   html = '<div class="key_city">'
		  
		   html += ' <h2> '+ city +', 按拼音排序</h2> <div class="key_c"> ';
		   var len;
		   if(res.length < pageSize) len = res.length;
		   else len = pageSize;
		  	    
					for ( var i = 0; i < len; i++) {
						html += '<li title='+res[i].name+'><a><em>'
								+ res[i].name + '</em><span>'
								+ res[i].pinyin
								+ '</span></a></li>';
					}
					html += '</div>';				
					
					html += pageBar;
										
					html += "</div>";
					
					$("#city_1+.suggestions").html(html);
					$("#city_1+.suggestions li").click(function() {
						$("#city_1").val(this.title);
						$(".suggestions").hide();
					});
					ShowDiv1(obj);
		} 
	});       		       				
	}
		
	/*------------事件---------*/
	$("body").click(function() {
		$(".suggestions").hide();
		$(".address_hot").hide();
	});
	$(".suggestions").click(function(e) {
		stopBubble(e);
	});
	$("#city_1+.suggestions li").click(function() {
		$("#city_1").val(this.title);
		$(".suggestions").hide();
		
	});
	$("#keyword+.suggestions li").click(function() {
		$("#keyword").val(this.title);
		$(".suggestions").hide();
	});
/*2*/
	function ShowData2(obj) {
		switch (obj.id) {
		case "city_2":
			showCityList2(obj,1);
			break;
		case "keyword":
			showHotelList(obj);
			break;
		default:
			break;
		}
	}
	function ShowDiv2(obj) {
		$(".address_hot").hide();
		if ($("#" + obj.id).val() != "")
			$("#" + obj.id + "+.suggestions").show();
		else
			$("#" + obj.id + "+.suggestions").hide();
	}
	function showCityList2(obj,page) {
		var pageSize = 8;
		var city = $("#city_2").val();
		
		$.ajax({
		url:"getCityList.htm",
		type:"GET",
		dataType:"json",
		data:{
		        "keyword":city,
		        "currPage":page,
		        "pageSize":pageSize
		},  
		success:function(data) {  
		   var totalPage = data.totalPage;
		   var pageBar = '<div class="key_page">';
		   var res = data.listJson;
		   
		   for(var i = 0; i < data.pageBar.length; i++) {
		     if (page == data.pageBar[i])
		        pageBar += '<a class="now_k" href="#">' + data.pageBar[i]+ '</a>'
		   	 else { 
		   	    pageBar += '<a href="javascript:showCityList2(this,'+data.pageBar[i] +')">' + data.pageBar[i]+ '</a>'
		     }
		   }
		     pageBar += '</div>'
		   
		  
		   var html = '';
		   html = '<div class="key_city">'
		  
		   html += ' <h2> '+ city +', 按拼音排序</h2> <div class="key_c"> ';
		   var len;
		   if(res.length < pageSize) len = res.length;
		   else len = pageSize;
		 	    
					for ( var i = 0; i < len; i++) {
						html += '<li title='+res[i].name+'><a><em>'
								+ res[i].name + '</em><span>'
								+ res[i].pinyin
								+ '</span></a></li>';
					}
					html += '</div>';				
				
					html += pageBar;
					
										
					html += "</div>";
					
					$("#city_2+.suggestions").html(html);
					$("#city_2+.suggestions li").click(function() {
						$("#city_2").val(this.title);
						$(".suggestions").hide();
					});
					ShowDiv2(obj);
		} 
	});       		      				
	}
		
	/*------------事件---------*/
	$("body").click(function() {
		$(".suggestions").hide();
		$(".address_hot").hide();
	});
	$(".suggestions").click(function(e) {
		stopBubble(e);
	});
	$("#city_1+.suggestions li").click(function() {
		$("#city_2").val(this.title);
		$(".suggestions").hide();
	});
	$("#keyword+.suggestions li").click(function() {
		$("#keyword").val(this.title);
		$(".suggestions").hide();
	});
/*3*/
	function ShowData3(obj) {
		switch (obj.id) {
		case "city_3":
			showCityList3(obj,1);
			break;
		case "keyword":
			showHotelList(obj);
			break;
		default:
			break;
		}
	}
	function ShowDiv3(obj) {
		$(".address_hot").hide();
		if ($("#" + obj.id).val() != "")
			$("#" + obj.id + "+.suggestions").show();
		else
			$("#" + obj.id + "+.suggestions").hide();
	}

	function showCityList3(obj,page) {
		var pageSize = 8;
		var city = $("#city_3").val();
		
		$.ajax({
		url:"getCityList.htm",
		type:"GET",
		dataType:"json",
		data:{
		        "keyword":city,
		        "currPage":page,
		        "pageSize":pageSize
		},  
		success:function(data) {  
		   var totalPage = data.totalPage;
		   var pageBar = '<div class="key_page">';
		   var res = data.listJson;
		   
		   for(var i = 0; i < data.pageBar.length; i++) {
		     if (page == data.pageBar[i])
		        pageBar += '<a class="now_k" href="#">' + data.pageBar[i]+ '</a>'
		   	 else { 
		   	    pageBar += '<a href="javascript:showCityList3(this,'+data.pageBar[i] +')">' + data.pageBar[i]+ '</a>'
		     }
		   }
		     pageBar += '</div>'
		   
		  
		   var html = '';
		   html = '<div class="key_city">'
		  
		   html += ' <h2> '+ city +', 按拼音排序</h2> <div class="key_c"> ';
		   var len;
		   if(res.length < pageSize) len = res.length;
		   else len = pageSize;
		  		    
					for ( var i = 0; i < len; i++) {
						html += '<li title='+res[i].name+'><a><em>'
								+ res[i].name + '</em><span>'
								+ res[i].pinyin
								+ '</span></a></li>';
					}
					html += '</div>';				
					 
					html += pageBar;
					
										
					html += "</div>";
					
					$("#city_3+.suggestions").html(html);
					$("#city_3+.suggestions li").click(function() {
						$("#city_3").val(this.title);
						$(".suggestions").hide();
					});
					ShowDiv3(obj);
		} 
	});       		     				
	}		
	/*------------事件---------*/
	$("body").click(function() {
		$(".suggestions").hide();
		$(".address_hot").hide();
	});
	$(".suggestions").click(function(e) {
		stopBubble(e);
	});
	$("#city_3+.suggestions li").click(function() {
		$("#city_3").val(this.title);
		$(".suggestions").hide();
	});
	$("#keyword+.suggestions li").click(function() {
		$("#keyword").val(this.title);
		$(".suggestions").hide();
	});
 /*4*/
	function ShowData4(obj) {
		switch (obj.id) {
		case "city_4":
			showCityList4(obj,1);
			break;
		case "keyword":
			showHotelList(obj);
			break;
		default:
			break;
		}
	}

	function ShowDiv4(obj) {
		$(".address_hot").hide();
		if ($("#" + obj.id).val() != "")
			$("#" + obj.id + "+.suggestions").show();
		else
			$("#" + obj.id + "+.suggestions").hide();
	}

	function showCityList4(obj,page) {
		var pageSize = 8;
		var city = $("#city_4").val();
		
		$.ajax({
		url:"getCityList.htm",
		type:"GET",
		dataType:"json",
		data:{
		        "keyword":city,
		        "currPage":page,
		        "pageSize":pageSize
		},  
		success:function(data) {  
		   var totalPage = data.totalPage;
		   var pageBar = '<div class="key_page">';
		   var res = data.listJson;
		   
		   for(var i = 0; i < data.pageBar.length; i++) {
		     if (page == data.pageBar[i])
		        pageBar += '<a class="now_k" href="#">' + data.pageBar[i]+ '</a>'
		   	 else { 
		   	    pageBar += '<a href="javascript:showCityList4(this,'+data.pageBar[i] +')">' + data.pageBar[i]+ '</a>'
		     }
		   }
		     pageBar += '</div>'
		   
		  
		   var html = '';
		   html = '<div class="key_city">'
		  
		   html += ' <h2> '+ city +', 按拼音排序</h2> <div class="key_c"> ';
		   var len;
		   if(res.length < pageSize) len = res.length;
		   else len = pageSize;
		      
					for ( var i = 0; i < len; i++) {
						html += '<li title='+res[i].name+'><a><em>'
								+ res[i].name + '</em><span>'
								+ res[i].pinyin
								+ '</span></a></li>';
					}
					html += '</div>';				
					
					html += pageBar;
					
										
					html += "</div>";
					
					$("#city_4+.suggestions").html(html);
					$("#city_4+.suggestions li").click(function() {
						$("#city_4").val(this.title);
						$(".suggestions").hide();
					});
					ShowDiv4(obj);
		} 
	});       		    				
	}	
	/*------------事件---------*/
	$("body").click(function() {
		//initData();
		$(".suggestions").hide();
		$(".address_hot").hide();
	});
	$(".suggestions").click(function(e) {
		stopBubble(e);
	});
	$("#city_4+.suggestions li").click(function() {
		$("#city_4").val(this.title);
		$(".suggestions").hide();
	});
	$("#keyword+.suggestions li").click(function() {
		$("#keyword").val(this.title);
		$(".suggestions").hide();
	});
	$(".address_hotlist li a").click(function(e) {
		stopBubble(e);		
		$(this).parent().parent().parent().parent().parent().children("input").val($(this).html());
		 // $(this).parent().parent().parent().parent().parent().children("input").val("1");
		$(this).parent().parent().parent().parent(".address_hot").hide();
	});		  
		


		/*类目*/
	 
	 $(".plei").hide();
     $(".pplei").click(function(){
         var me =$(".pplei").index($(this));
         $(".plei").eq(me).show();
     }) 
     $(".plei a.city_close").click(function(){
         $(this).parent().parent().hide();
     })
	function setCategoryData(name) {
		   //$("#category").val(name);
		   //$(".plei").hide();
	}

    $(".address_hot_abb li").click(function(){	  
		   $(this).addClass("cur2");				
		   $(this).siblings("li").removeClass("cur2");				
		   var mini = $(this).parent().children("li").index(this);
				if(mini == "0"){
				    $(".shop_typeul").show();$(".shop_position").hide();
				    }
			    else{
			        $(".shop_position").show();$(".shop_typeul").hide()
			        }      

		});
	$("body").click(function() {
		$(".plei").hide();
	});
	$(".pplei").click(function(e){
	      stopBubble(e);
	      $(this).parent().children(".plei").show();	
	});
	$(".pplei").blur(function(){
	     // $(".plei").hide();
	})
    $(".shop_typeul li a").click(function(e){
            stopBubble(e)
            var httm = $(this).html();
            $(this).parent().parent().parent().parent().parent().children(".pplei").val(httm) ;  
            $(this).parent().parent().parent().parent().hide();
    })	
    
    
 function reset_form()
{
	document.searchForm.reset();
	$(".input_text").css("color","#8e8e8e");
}

function reset_servform() 
{
	document.searchForm.reset();
	$(".input_text").css("color","#8e8e8e");
}